package ooday03;

import ooday04.Chick;
import ooday04.Dog;
import ooday04.Fish;

public class Test02 {
    public static void main(String[] args) {

        Dogs[] dogs=new Dogs[3];
        dogs[0]=new Dogs("小黑",2,"白");
        dogs[1]=new Dogs("旺财",4,"黄");
        dogs[2]=new Dogs("二哈",1,"黑白相间");
        for(int i=0;i<dogs.length;i++){
            System.out.println(dogs[i].name);
            dogs[i].eat();
            dogs[i].lookHome();
        }

        Chicks[] chicks=new Chicks[2];
        chicks[0]=new  Chicks("坤坤",2,"黑衣白带");
        chicks[1]=new  Chicks("胸大鸡",10,"黄");
        chicks[0].drink();
        for(int i=0;i<chicks.length;i++){
            System.out.println(chicks[i].name);
            chicks[i].layEggs();
        }

        Fishes[] fish=new Fishes[4];
        fish[0]=new Fishes("俞俐均",22,"白");
        fish[1]=new Fishes("大白鲨",4,"白");
        fish[2]=new Fishes("美人鱼",3,"粉");
        fish[3]=new Fishes("幸运鲤",1,"红");
        for(int i=0;i<fish.length;i++){
            System.out.println(fish[i].name);
            fish[i].swim();
        }
    }
}
